<?php
$this->breadcrumbs=array(
	t('Member','web') =>array('/member/index/index'),
	'交易管理 '=>array('/member/index/orders'),
	'评论管理',
);

Yii::app()->clientScript->registerScript('search', "
$('#changeLevel1').live('change',function(){
	$('#tab1').addClass('loading');
	$.ajax({
		type:'GET',
		url: '',
		data: $('#comment-form-company').serialize(),
		success: function(data){
			$('#tab1').removeClass('loading');
			$('#tab1').replaceWith($('#tab1',data));
		}
	});
	return false;
});
$('#changeLevel2').live('change',function(){
	$('#tab2').addClass('loading');
	$.ajax({
		type:'GET',
		url: '',
		data: $('#comment-form-buyer').serialize(),
		success: function(data){
			$('#tab2').removeClass('loading');
			$('#tab2').replaceWith($('#tab2',data));
		}
	});
	return false;
});
");
?>
    	<!--评价管理 start--> 
        <div class="rate_box mt10 d_n">
        	<div class="hd c_f"><span class="c_f60 f_r mr10">好评率：<?php echo $credit[0]['total'] ? number_format(($credit[3]['total']*100)/$credit[0]['total'],2) : $credit[0]['total'];?>%</span><span class="fw_b">信用积分：<a class="c_06c" href="javascript:"><?php echo $credit[3]['total'];?></a></span></div>
            <table class="list_table bg_fff" width="100%" cellpadding="0" cellspacing="0">
            	<tr>
                	<th width="20%"></th>
                    <th width="16%">最近1周</th>
                    <th width="16%">最近1个月</th>
                    <th width="16%">最近3个月</th>
                    <th width="16%">3个月前</th>
                    <th width="16%">小计</th>
                </tr>
                <tr>
                	<td><span class="mem_ico rate_good"></span>好评</td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[3]['in_a_week'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[3]['in_a_month'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[3]['in_three_month'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[3]['three_month_before'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[3]['total'];?></a></td>
                </tr>
                <tr>
                	<td><span class="mem_ico rate_normal"></span>中评</td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[2]['in_a_week'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[2]['in_a_month'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[2]['in_three_month'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[2]['three_month_before'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[2]['total'];?></a></td>
                </tr>
                <tr>
                	<td><span class="mem_ico rate_bad"></span>差评</td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[1]['in_a_week'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[1]['in_a_month'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[1]['in_three_month'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[1]['three_month_before'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[1]['total'];?></a></td>
                </tr>
                <tr>
                	<td>总计</td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[0]['in_a_week'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[0]['in_a_month'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[0]['in_three_month'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[0]['three_month_before'];?></a></td>
                    <td><a class="c_06c" href="javascript:"><?php echo $credit[0]['total'];?></a></td>
                </tr>
            </table>
        </div>
    	<!--评价管理 end--> 
        <div class="hr_15"></div>
        <?php $this->widget('CTabView', array(
			'tabs'=>array(
					 /*   'tab1'=>array(
					          'title'=>'来自商家的评价',
					          'view'=>'_comment_company',
							  'data'=>array('model'=>$model)
					    ),*/
					    'tab2'=>array(
					          'title'=>'给他人的评价',
					          'view'=>'_comment_buyer',
							  'data'=>array('model'=>$model)
					    ),
					),
			'htmlOptions'=>array('class'=>'department yiiTab'),
		)); ?>
        